<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>大拇哥资源共享平台</title>
    <!--视口 不缩放 -->
    <meta name="viewport" content="user-scalable=no,width=device-width, initial-scale=1.0,  minimum-scale=1.0, maximum-scale=1.0">
    <meta name="flexible" content="initial-dpr=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <!-- 网页作者 -->
    <meta name="author" content="hg" />
    <!-- 添加到主屏后的标题（iOS 6 新增） -->
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <!-- 是否启用 WebApp 全屏模式，删除苹果默认的工具栏和菜单栏 -->
    <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
    <!-- 设置苹果工具栏颜色 -->
    <meta name="format-detection" content="telphone=no, email=no" />
    <!-- 忽略页面中的数字识别为电话，忽略email识别 -->
    <!-- 启用360浏览器的极速模式(webkit) -->
    <meta name="renderer" content="webkit">
    <!-- 不让百度转码 -->
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!-- windows phone 点击无高光 -->
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="msapplication-TileColor" content="#000" />
    <!--<link href="logo.ico" rel="shortcut icon" type="image/x-icon">-->
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="__PUBLIC__/dist/js/html5shiv.min.js"></script>
      <script src="__PUBLIC__/dist/js/respond.min.js"></script>
    <![endif]-->
    <link rel="shortcut icon" href="favicon.ico">

    <link href="__PUBLIC__/dist/css/login.css" rel="stylesheet">
</head>

<body>

    <div class="login">
        <i class="bg1"></i>
        <i class="bg2"></i>
        <section class="login-content">
            <a href="/"><img class="login-logo" src="__PUBLIC__/dist/image/login/logo.png"></a>
            <h1><a href="/">共建共享教学资源库平台</a></h1>
			<p>用　户　登　录</p>
			<!-- <form method="post" action="{:URL('User-Login/dologin')}"> -->
				<div class="user">
					<input id="username" name="username" type="text" placeholder="帐　号" autocomplete="off">
				</div>
				<div class="pw">
					<input id="password" name="password" type="password" placeholder="密　码" autocomplete="off">
				</div>
				<!-- {if  $member_config['member_login_verify']}
				<div class="yz">
					<input type="text" name="verifyCode"  id="verifyCode"  size="6" value="" maxlength="4" / placeholder="验　证　码" autocomplete="off">
					<span>
						<img src="{:U('Home/Index/verify')}" />
					</span>
				</div>
				{/if} -->
				<div class="memory">
                    <span class="warning"></span>
					<a>忘记密码</a>
				</div>
				<div class="submit">
					<button id="queren" type="submit">确　认</button>
				</div>
				<div class="xy">
                                    <input id="tyck" type="checkbox" checked> <a href="index.php?m=Article&a=show&id=3" target="_blank">同意遵循本平台用户协议</a></div>
					<input type="hidden" id="forward" name="forward" value="{$forward}"/>
			<!-- </form> -->
        </section>
    </div>
    <script src="__PUBLIC__/dist/js/jquery.min.js"></script>
    <script>
        
            function rem() {
                var docEl = document.documentElement;
                var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
                function recalc() {
                    var w = docEl.clientWidth;
                    if(w > 640) w = 640;
                    docEl.style.fontSize = 100 * (w / 640) + 'px';
                }
                //绑定浏览器旋转与加载 时
                window.addEventListener(resizeEvt, recalc, false);
                document.addEventListener('DOMContentLoaded', recalc, false);
            }
            rem();

            $(".memory a").on("click",function(){
                text_color("请联系学校平台负责人")
            })

            function text_color(txt){
                console.log(txt)
                var obj = document.querySelector(".warning");
                obj.innerHTML = txt;
                obj.classList.add("in");
                setTimeout(function(){
                    obj.classList.remove("in");                    
                },2250)
            }
            document.onkeydown = function (event) {
                var e = event || window.event;
                if (e && e.keyCode == 13) { //
                    $("#queren").click(); //
                }
            }; 
            $("#queren").click(function(){
                var username=$("#username").val();
                var password=$("#password").val();
                var forward=$("#forward").val();
                if(!username)
                {
                    text_color("账号不能为空")
                }
                else if(!password)
                {
                    text_color("密码不能为空")
                }
                else if(!$('#tyck').is(':checked'))
                {
                    text_color("请勾选平台用户协议");
                }
                else
                {
                    login(username,password,forward);
                }
                 
            });
            function login(username,password,forward) {
                $.ajax({
                    url: "{:URL('User-Login/dologin')}",
                    type: "post",
                    data: {username:username,password:password,forward:forward},
                    dataType: "json",
                    success: function (data) {
                        //console.log(data);
                        if(data.status==1)
                        {
                            window.location.href=data.jumpUrl;
                        }
                        else
                        {
                            text_color(data.info)
                        }
                         
                    }
                })
            }
      
    </script>
</body>
</html>

 

<!-- <div class="main">
	<h3>{:L(user_login)}</h3>
		<div class="block-msg">
		<form method="post" action="{:URL('User-Login/dologin')}">
		<table width="100%">
		<tr>
			<td align="right" height="35px">{:L(user_username)}：</td>
			<td><input type="text" id="username" name="username" class="input-text" /></td>
		</tr>
		<tr>
			<td align="right" height="35px">{:L(user_password)}：</td>
			<td><input type="password" id="password" name="password" class="input-text" /></td>
		</tr>
		
		{if  $member_config['member_login_verify']}
		 <tr>
		   <td  align="right" height="35px">{:L('verify')}：</td>
		   <td><input name="verifyCode" class="input-text"  class="inputbox" id="verifyCode"  size="6" value="" maxlength="4" /><img src="{:U('Home/Index/verify')}" onclick="javascript:resetVerifyCode();" class="checkcode" align="absmiddle"  title="{:L('resetVerifyCode')}" id="verifyImage"/></td>
		</tr>
		{/if}
		<tr>
			<td>&nbsp;</td><input type="hidden" id="forward" name="forward" value="{$forward}"/>
			<td height="50px"><input type="submit" class="button" value="{:L(user_login)}" />&nbsp;<a href="{:URL('User-Register/index?forward=')}{$forward|urlencode}" target="_top" />{:L(REGISTER)}</a>&nbsp; <a href="{:URL('User-Login/getpass')}">{:L(user_forgot_password)}</a></td>
		</tr>

		</table>
		</form>
		</div>
</div> -->
